package com.pdsu.xpf.graduation01.service.impl;

import com.pdsu.xpf.graduation01.dao.IPayCommodityDao;
import com.pdsu.xpf.graduation01.dto.PayCommodityDTO;
import com.pdsu.xpf.graduation01.service.IPayCommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PayCommodityServiceImpl implements IPayCommodityService {



    final
    IPayCommodityDao payCommodityDao;

    public PayCommodityServiceImpl(IPayCommodityDao payCommodityDao) {
        this.payCommodityDao = payCommodityDao;
    }

    @Override
    public List<PayCommodityDTO> findPayCommodityByUID(int uid) {
        return payCommodityDao.findPayCommodityByUID(uid);
    }

    @Override
    public Integer removePayCommodityByUIDAndCID(int uid, int cid) {
        return payCommodityDao.removePayCommodityByUIDAndCID(uid,cid);
    }
}
